tests/libtest: Allow appending actions to be run on EXIT
authorDan Nicholson <nicholson@endlessm.com>
Thu, 13 Jun 2019 20:57:17 +0000 (15:57 -0500)
committerAtomic Bot <atomic-devel@projectatomic.io>
Wed, 19 Jun 2019 17:30:24 +0000 (17:30 +0000)
commit0dd27bbf4b5a3f132a9b2418b391dacbcd64a003
tree9c5c1ec723539b6a59e4da0a0f2a90dd3f53729b
parentb6979e7572395f3f99ba328ed9399ed4b862f9a7
tests/libtest: Allow appending actions to be run on EXIT

Currently if a test script adds a trap on `EXIT` to run some cleanup, it
will stomp on the existing trap to run `save_core()`. Allow for scripts
to append actions that will run on exit by introducing an array that
will be iterated over by a single exit runner.

Closes: #1799
Approved by: cgwalters
tests/libtest.sh
tests/test-repo-finder-mount-integration.sh
tests/test-rofiles-fuse.sh